package com.gym.enums;

public enum ResultEnum {

	/**
	 * 公用部分
	 */
	SUCCESS(0, "成功"),

	UNKNOW_EXCEPTION(500, "系统未知异常"),

	/**
	 * 用户模块
	 */
	USER_NAME_IS_NULL(1001, "用户名为空"),

	USER_NAME_FORMAT_IS_ILLEGAL(1002, "用户名格式不正确"),

	USER_PASSWORD_IS_NULL(1003, "用户密码为空"),

	PASSWORD_FORMAT_IS_ILLEGAL(1004, "密码格式错误"),

	PASSWORD_AND_SECONDPASSWORD_IS_NOT_CONSISTENT(1005, "两次密码输入不一致"),

	PASSWORD_LENGTH_IS_ILLEGAL(1006, "密码长度不符合"),

	USER_TEL_IS_NULL(1007, "手机号码为空"),

	TEL_FORMAT_ERROR(1008, "手机号码格式错误"),

	USER_TEL_HAS_BEEN_REGISTED(1009, "手机号码已被注册"),

	NOT_EXIST_USER(1010, "不存在该用户"),

	LOGINNAME_OR_PASSWORF_NOT_NULL(1011, "账户名或密码不能为空"),

	LOGINNAME_OR_PASSWORD_ERROR(1012, "账号或密码错误"),

	ACCOUNT_HAS_BEEN_LOCKED(1013, "账号被锁"),

	USER_NAME_LENGTH_IS_ILLEGAL(1014, "用户名长度不符合"),

	USER_HAS_EXIST(1015, "用户已被注册"),

	/**
	 * 赛事模块
	 */
	EVENTRESERVATION_IS_NOT_NULL(2001, "预约表不能为空"),

	SELECT_CONDITION_IS_NOT_NULL(2002, "查询条件不能为空"),

	EVENTRECORD_IS_NOT_NULL(2003, "赛事记录表单不能为空"),

	RECORDER_IS_NOT_NULL(2004, "记录者不能为空"),

	/**
	 * 器材模块
	 */

	/**
	 * 场地模块部分
	 */
	SITE_INSERT_SUCCESS(4001, "添加成功"),

	SITE_NAME_NOT_NULL(4002, "场地名称不能为空"),

	UPDATE_FAIL(4003, "修改失败"),

	SITE_DELETE_SUCCESS(4004, "删除成功"),

	ORDER_SUCCESS(405, "预约成功"),

	CANCEL_SUCCESS(406, "取消成功"),

	TIME_CONFLICT(407, "预约时间冲突"),

	NOT_LOGIN(401, "not login");

	private Integer code;
	private String message;

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	ResultEnum(Integer code, String message) {
		this.code = code;
		this.message = message;
	}

}
